package main

import (
	"fmt"
	"log"
	"os"

	"github.com/spf13/viper"
)

func loadConfigFile() {
	configPath := getConfigPath()
	file, err := os.Open(configPath)
	defer file.Close()
	if err != nil {
		log.Fatalln(err)
	}
	viper.SetConfigType("json")
	viper.ReadConfig(file)
	gName := viper.GetString("root.name")
	fmt.Println(gName)
	gInt := viper.GetInt("root.description")
	fmt.Println(gInt)
}
